﻿@using Masuit.MyBlogs.Core.Common
@model Masuit.MyBlogs.Core.Models.Entity.Misc
@{
    ViewBag.Title = Model.Title;
    Layout = "~/Views/Shared/_Layout.cshtml";
    Random r = new Random();
}
<link href="~/Assets/UEditor/third-party/SyntaxHighlighter/styles/shCore.css" rel="stylesheet" />
<style>
    .bg-title {
        height: 50vh;
        max-height: 400px;
        position: relative;
        background: url(/Content/images/@(r.Next(1,9)).jpg) no-repeat center;
        background-size:cover;
        background-attachment: fixed;
    }
    .header-content {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
    }
    .header-content .divider {
        width: inherit;
        height: 20px;
        margin-top: 20px;
        border-top: 3px solid rebeccapurple;
    }
    .content {
        text-indent:36px;
        line-height: 24px;
        font-size: 18px;
    }
    .content h3{
        font-size: 24px;
    }
</style>
<ol class="cd-breadcrumb triangle">
    <li><a asp-controller="Home" asp-action="Index">首页</a></li>
    <li class="current">
        <em>@ViewBag.Title</em>
    </li>
</ol>
<div class="bg-title">
    <div class="header-content text-center">
        <h1 class="size48">
            @Model.Title
        </h1>
        <div class="divider"></div>
    </div>
</div>
<div class="container">
    <article class="content">
        @Html.Raw(await Model.Content.ReplaceImgAttribute(Model.Title))
    </article>
</div>
<script src="~/Assets/UEditor/third-party/SyntaxHighlighter/scripts/shCore.js"></script>
<script src="~/Assets/UEditor/third-party/SyntaxHighlighter/scripts/bundle.min.js"></script>
<script>
    SyntaxHighlighter.all();
    SyntaxHighlighter.defaults['toolbar'] = false;
</script>